<?php
    require("../config.php");
    $result = mysql_query("SELECT * FROM country_items");
    if (isset($_GET['btnSubmit'])){
        if ($_GET['txtCountry'] != "" && $_GET['txtSortCountry'] != ""){
            mysql_query("INSERT INTO country_items(id, sort_name, country_items) VALUES('', '".$_GET['txtSortCountry']."', '".$_GET['txtCountry']."')");
            echo 'done';
        }
    }
?>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="author" content="Invisible Man" />

	<title>Country</title>
</head>

<body>
    <table align="center">
        <tr>
            <td>
                <form action="#" method="get">
                    <fieldset>
                        <legend>Adding Items Country</legend>
                        <table>
                            <tr>
                                <td width="150px">
                                    Country's Name :
                                </td>
                                <td width="250px">
                                    <input type="text" name="txtCountry" size="30"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Sort Name :
                                </td>
                                <td>
                                    <input type="text" name="txtSortCountry" size="30"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>  
                                <td>
                                    <input type="submit" name="btnSubmit"/>
                                    <input type="reset" name="btnReset"/>
                                </td>           
                            </tr>
                        </table>
                    </fieldset>
                </form>
            </td>
        </tr>
    </table>


</body>
</html>